SRRiskControl
SpdrRiskControl records are used to establish supervisory control of equity, and equity option trading in SpiderRock execution engines. These records are only viewable and editable by RiskAdmin users with access to the control record ClientFirm
METADATA
Attribute | Value |
---|---|
Topic | 4535-risk-control |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | ANYANY default if a more precise ticker control does not exist |
ticker_ts | enum - TickerSrc | PRI | 'None' | ANYANY default if a more precise ticker control does not exist |
ticker_tk | VARCHAR(12) | PRI | '' | ANYANY default if a more precise ticker control does not exist |
riskControlKey | VARCHAR(16) | PRI | '' | must be an SRClientAccnt if riskControlLevelAccnt must be an SRUser if riskControlLevelUser ignored if riskControlLevelClientFirm |
riskControlLevel | enum - RiskControlLevel | PRI | 'None' | |
riskFirm | VARCHAR(16) | PRI | '' | |
isTestAccnt | enum - YesNo | PRI | 'None' | if Yes this control applies only to risk from test accnts |
stkEnabled | enum - MarState | 'None' | ||
futEnabled | enum - MarState | 'None' | ||
optEnabled | enum - MarState | 'None' | ||
marginLimitDay | FLOAT | 0 | maximum net per symbolday day portfolio day trades only margin can include external sources | |
openExposureLimit | FLOAT | 0 | maximum abs open child order Delta no netting open child orders only | |
maxDayDDeltaLn | FLOAT | 0 | open long Delta per trading session | |
maxDayDDeltaSh | FLOAT | 0 | open short Delta per trading session | |
maxDayDDeltaAbs | FLOAT | 0 | absolute Delta ddBot ddSld position per trading session | |
maxDayWtVegaLn | FLOAT | 0 | open long WtVega per trading session | |
maxDayWtVegaSh | FLOAT | 0 | open short WtVega per trading session | |
maxDayWtVegaAbs | FLOAT | 0 | open absolute WtVega WtVeBot WtVeSld per trading session | |
maxDayNValueLn | FLOAT | 0 | open long notional value per trading session | |
maxDayNValueSh | FLOAT | 0 | open short notional value per trading session | |
maxDayNValueAbs | FLOAT | 0 | absolute notional value NValueBot NValueSld per trading session | |
modifiedBy | VARCHAR(24) | '' | ||
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
riskControlKey | 4 |
riskControlLevel | 5 |
riskFirm | 6 |
isTestAccnt | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgSRRiskControl` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' default (if a more precise ticker control does not exist)',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' default (if a more precise ticker control does not exist)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT '''*-ANY-ANY'' default (if a more precise ticker control does not exist)',
`riskControlKey` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'must be an SRClientAccnt if riskControlLevel=Accnt; must be an SRUser if riskControlLevel=User; ignored if riskControlLevel=ClientFirm',
`riskControlLevel` ENUM('None','ClientFirm','Accnt','User') NOT NULL DEFAULT 'None',
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'if Yes, this control applies only to risk from test accnts',
`stkEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`futEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`optEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`marginLimitDay` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum net (per symbol/day) day portfolio (day trades only) margin (can include external sources)',
`openExposureLimit` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum abs open child order $Delta (no netting) (open child orders only)',
`maxDayDDeltaLn` FLOAT NOT NULL DEFAULT 0 COMMENT 'open long $Delta per trading session',
`maxDayDDeltaSh` FLOAT NOT NULL DEFAULT 0 COMMENT 'open short $Delta per trading session',
`maxDayDDeltaAbs` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute $Delta, |ddBot| + |ddSld| position per trading session',
`maxDayWtVegaLn` FLOAT NOT NULL DEFAULT 0 COMMENT 'open long WtVega per trading session',
`maxDayWtVegaSh` FLOAT NOT NULL DEFAULT 0 COMMENT 'open short WtVega per trading session',
`maxDayWtVegaAbs` FLOAT NOT NULL DEFAULT 0 COMMENT 'open absolute WtVega, |WtVeBot| + |WtVeSld| per trading session',
`maxDayNValueLn` FLOAT NOT NULL DEFAULT 0 COMMENT 'open long notional value per trading session',
`maxDayNValueSh` FLOAT NOT NULL DEFAULT 0 COMMENT 'open short notional value per trading session',
`maxDayNValueAbs` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute notional value, |NValueBot| + |NValueSld| per trading session',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`riskControlKey`,`riskControlLevel`,`riskFirm`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SpdrRiskControl records are used to establish supervisory control of equity, and equity option trading in SpiderRock execution engines. These records are only viewable and editable by RiskAdmin users with access to the control record ClientFirm';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`riskControlKey`,
`riskControlLevel`,
`riskFirm`,
`isTestAccnt`,
`stkEnabled`,
`futEnabled`,
`optEnabled`,
`marginLimitDay`,
`openExposureLimit`,
`maxDayDDeltaLn`,
`maxDayDDeltaSh`,
`maxDayDDeltaAbs`,
`maxDayWtVegaLn`,
`maxDayWtVegaSh`,
`maxDayWtVegaAbs`,
`maxDayNValueLn`,
`maxDayNValueSh`,
`maxDayNValueAbs`,
`timestamp`
FROM `SRControl`.`MsgSRRiskControl`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`riskControlKey` = 'Example_riskControlKey'
AND
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel` = 'None'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgSRRiskControl`
SET
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled` = 'None',
/* Replace with a FLOAT */
`marginLimitDay` = 1.23,
/* Replace with a FLOAT */
`openExposureLimit` = 1.23,
/* Replace with a FLOAT */
`maxDayDDeltaLn` = 1.23,
/* Replace with a FLOAT */
`maxDayDDeltaSh` = 1.23,
/* Replace with a FLOAT */
`maxDayDDeltaAbs` = 1.23,
/* Replace with a FLOAT */
`maxDayWtVegaLn` = 1.23,
/* Replace with a FLOAT */
`maxDayWtVegaSh` = 1.23,
/* Replace with a FLOAT */
`maxDayWtVegaAbs` = 1.23,
/* Replace with a FLOAT */
`maxDayNValueLn` = 1.23,
/* Replace with a FLOAT */
`maxDayNValueSh` = 1.23,
/* Replace with a FLOAT */
`maxDayNValueAbs` = 1.23,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`riskControlKey` = 'Example_riskControlKey'
AND
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel` = 'None'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgSRRiskControl`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a VARCHAR(16) */
`riskControlKey`,
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel`,
/* Replace with a VARCHAR(16) */
`riskFirm`,
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled`,
/* Replace with a FLOAT */
`marginLimitDay`,
/* Replace with a FLOAT */
`openExposureLimit`,
/* Replace with a FLOAT */
`maxDayDDeltaLn`,
/* Replace with a FLOAT */
`maxDayDDeltaSh`,
/* Replace with a FLOAT */
`maxDayDDeltaAbs`,
/* Replace with a FLOAT */
`maxDayWtVegaLn`,
/* Replace with a FLOAT */
`maxDayWtVegaSh`,
/* Replace with a FLOAT */
`maxDayWtVegaAbs`,
/* Replace with a FLOAT */
`maxDayNValueLn`,
/* Replace with a FLOAT */
`maxDayNValueSh`,
/* Replace with a FLOAT */
`maxDayNValueAbs`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'None',
'None',
'Example_ticker_tk',
'Example_riskControlKey',
'None',
'Example_riskFirm',
'None',
'None',
'None',
'None',
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgSRRiskControl`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`riskControlKey` = 'Example_riskControlKey'
AND
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel` = 'None'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='SRRiskControl' ORDER BY ordinal_position ASC;